/**************************************************************************
** Qt Creator license header template
**   Special keywords: Programmer 2012/5/10 2012
**   Environment variables: 
**   To protect a percent sign, use '%'.
**************************************************************************/

#ifndef PROGRESSIVEMESHFILTER_H
#define PROGRESSIVEMESHFILTER_H

#include <QObject>
#include <common/interfaces.h>

class ProgressiveMeshFilter : public QObject,public MeshFilterInterface
{
    Q_OBJECT
    Q_INTERFACES(MeshFilterInterface)

public:
    explicit ProgressiveMeshFilter(QObject *parent = 0);

    enum{
        FP_PM_QUADRIC,
        FP_PM_MID //to do
    };
    
    virtual QString filterName(FilterIDType filter) const;
    virtual QString filterInfo(FilterIDType filter) const;
    virtual FilterClass getClass(QAction *a);
    virtual void initParameterSet(QAction *a, MeshModel &m, RichParameterSet &parlst);
    virtual int getPreConditions(QAction *) const;
    virtual bool applyFilter(QAction *filter, MeshDocument &md, RichParameterSet &par, vcg::CallBackPos *cb);


signals:
    
public slots:
protected:
    float lastq_QualityThr;
    bool lastq_QualityWeight;
    bool lastq_PreserveBoundary;
    bool lastq_Selected;
    bool lastq_PreserveNormal;
    bool lastq_BoundaryWeight;
    bool lastq_PreserveTopology;
    bool lastq_OptimalPlacement;
    bool lastq_PlanarQuadric;
};

#endif // PROGRESSIVEMESHFILTER_H
